class Solution(object):
    def maxVacationDays(self, flights, days):
        """
        :type flights: List[List[int]]
        :type days: List[List[int]]
        :rtype: int
        """
        n = len(flights)
        k = len(days[0])
        DP = [[-1 for _ in range(n)] for _ in range(2)]
        for i in range(n):
            if i == 0:
                DP[0][0] = days[0][0]
            else:
                if flights[0][i]:
                    DP[0][i] = days[i][0]
        for day in range(1, k):
            for i in range(n):
                for j in range(n):
                    if j == i:
                        if DP[(day - 1) % 2][i] >= 0:
                            DP[day % 2][j] = max(DP[day % 2][j], DP[(day - 1) % 2][i] + days[j][day])
                    else:
                        if DP[(day - 1) % 2][i] >= 0 and flights[i][j]:
                            DP[day % 2][j] = max(DP[day % 2][j], DP[(day - 1) % 2][i] + days[j][day])
        return max(DP[(k - 1) % 2])



data = Solution()
# flights = [[0, 1, 1], [1, 0, 1], [1, 1, 0]]
# days = [[1, 3, 1], [6, 0, 3], [3, 3, 3]]
# print(data.maxVacationDays(flights, days))
# flights = [[0, 1, 1], [1, 0, 1], [1, 1, 0]]
# days = [[1, 3, 1], [6, 0, 3], [3, 3, 3]]
# print(data.maxVacationDays(flights, days))
flights = [[0,0,0,1,1,1,0,1,1,1,0,0,1,1,1,1,0,1,0,1,1,0,1,1,1,0,1,1,1,1,0,1,0,1,0,0,1,0,1,1,1,0,0,1,1,1,0,1,0,0,0,1,1,0,1,1,1,0,0,0,1,1,0,0,0,1,1,0,1,1,0,0,0,0,0,0,1,1,0,0,1,1,0,1,1,1,0,1,1,1,0,0,0,0,1,1,0,0,1,0],[1,0,1,1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,1,1,0,0,0,0,0,0,1,1,1,1,0,1,1,1,0,1,0,1,1,0,1,0,0,1,1,0,1,1,0,1,0,1,0,0,0,1,0,0,1,1,0,1,1,0,0,0,0,0,0,0,1,0,1,0,1,1,1,0,0,1,1,0,1,1],[1,1,0,1,1,0,0,0,0,0,1,1,0,0,1,1,1,0,0,1,0,1,0,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